package com.zt.ftphelper.model;

import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

import java.util.Objects;

public class TaskItem {
    private final StringProperty path = new SimpleStringProperty();

    public TaskItem() {
        setPath("");
    }
    public TaskItem(String path) {
        setPath(path);
    }

    public String getPath() {
        return path.get();
    }

    public StringProperty pathProperty() {
        return path;
    }

    public void setPath(String path) {
        this.path.set(path);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TaskItem taskItem = (TaskItem) o;
        return Objects.equals(getPath(), taskItem.getPath());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getPath());
    }
}
